package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RyMedicineMapper;
import com.ruoyi.system.domain.RyMedicine;
import com.ruoyi.system.service.IRyMedicineService;
import com.ruoyi.common.core.text.Convert;

/**
 * ry_medicineService业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-28
 */
@Service
public class RyMedicineServiceImpl implements IRyMedicineService 
{
    @Autowired
    private RyMedicineMapper ryMedicineMapper;

    /**
     * 查询ry_medicine
     * 
     * @param id ry_medicine主键
     * @return ry_medicine
     */
    @Override
    public RyMedicine selectRyMedicineById(String id)
    {
        return ryMedicineMapper.selectRyMedicineById(id);
    }

    /**
     * 查询ry_medicine列表
     * 
     * @param ryMedicine ry_medicine
     * @return ry_medicine
     */
    @Override
    public List<RyMedicine> selectRyMedicineList(RyMedicine ryMedicine)
    {
        return ryMedicineMapper.selectRyMedicineList(ryMedicine);
    }

    /**
     * 新增ry_medicine
     * 
     * @param ryMedicine ry_medicine
     * @return 结果
     */
    @Override
    public int insertRyMedicine(RyMedicine ryMedicine)
    {
        return ryMedicineMapper.insertRyMedicine(ryMedicine);
    }

    /**
     * 修改ry_medicine
     * 
     * @param ryMedicine ry_medicine
     * @return 结果
     */
    @Override
    public int updateRyMedicine(RyMedicine ryMedicine)
    {
        return ryMedicineMapper.updateRyMedicine(ryMedicine);
    }

    /**
     * 批量删除ry_medicine
     * 
     * @param ids 需要删除的ry_medicine主键
     * @return 结果
     */
    @Override
    public int deleteRyMedicineByIds(String ids)
    {
        return ryMedicineMapper.deleteRyMedicineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除ry_medicine信息
     * 
     * @param id ry_medicine主键
     * @return 结果
     */
    @Override
    public int deleteRyMedicineById(String id)
    {
        return ryMedicineMapper.deleteRyMedicineById(id);
    }
}
